package api

import (
	"fresh-e-commerce/api/handler"
	"fresh-e-commerce/pkg"
	"github.com/gin-gonic/gin"
)

func LoadApp(r *gin.Engine) {

	user := r.Group("/user")
	{
		user.POST("/login", handler.UserLogin)
		user.POST("/sms", handler.UserSms)
		user.Use(pkg.JWTAuth("qq")) //todo:中间件
		user.POST("/order/create", handler.OrderCreate)
		user.POST("/order/list", handler.OrderList)
	}
}
